﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/HeadManage.master" AutoEventWireup="true" CodeFile="admininf.aspx.cs" Inherits="Admin_admininf" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript">
        function alert(id, account, pwd) {
            $('#<%=login_id.ClientID%>').val(account);
            $('#<%=hide_id.ClientID%>').val(id);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
        <div style="display: inline">
            <asp:Button ID="Bt_delete" runat="server" Text="一键删除" class="am-btn am-btn-default am-round" OnClick="Bt_delete_Click" OnClientClick="return true" />
            <button id="Bt_add" type="button" class="am-btn am-btn-secondary am-round" data-am-modal="{target: '#my-alert'}">添加</button>
        </div>
        <div style="text-align: center; margin-top: 2%">
            <asp:Repeater ID="Repeater1" runat="server">
                <HeaderTemplate>
                    <table class="am-table am-table-bordered am-table-radius am-table-striped">
                        <tr>
                            <th></th>
                            <th>登陆账号</th>
                            <th>登陆密码</th>
                            <th>最后一次登陆时间</th>
                            <th>修改</th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:CheckBox ID="CheckBoxid" runat="server" value='<%#Eval("Mn_id")%>' /></td>
                        <td>
                            <asp:Label runat="server" ID="lblaccount" Text='<%# Eval("Mn_account") %>'></asp:Label></td>
                        <td>
                            <asp:Label runat="server" ID="lblpassword" Text='<%# Eval("Mn_password") %>'></asp:Label></td>
                        <td>
                            <asp:Label runat="server" ID="lbllosttime" Text='<%# Eval("Mn_losttime") %>'></asp:Label></td>
                        <td>
                            <button id="bt_alert" type="button" class="am-btn am-btn-warning am-round" onclick="alert('<%#Eval("Mn_id")%>','<%# Eval("Mn_account") %>','<%# Eval("Mn_password") %>')" data-am-modal="{target: '#my-alert'}">修改</button></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>
        <div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
            <div class="am-modal-dialog">
                <div class="am-modal-hd">数据编辑</div>
                <div class="am-modal-bd">
                    <div class="am-form am-form-horizontal">
                        <div class="am-form-group">
                            <label for="doc-ipt-3" class="am-u-sm-4 am-form-label">登陆账号</label>
                            <div class="am-u-sm-8">
                                <asp:TextBox runat="server" ID="login_id" placeholder="输入登陆账号" />
                            </div>
                            <p class="am-kai">
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="×登陆id不能为空" ControlToValidate="login_id" ForeColor="Blue"></asp:RequiredFieldValidator>
                            </p>
                        </div>
                        <div class="am-form-group">
                            <label for="doc-ipt-pwd-2" class="am-u-sm-4 am-form-label">新密码</label>
                            <div class="am-u-sm-8">
                                <asp:TextBox runat="server" ID="login_pwd" placeholder="输入登陆密码" />
                            </div>
                            <p class="am-kai">
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="×密码不能为空" ControlToValidate="login_pwd" ForeColor="Blue"></asp:RequiredFieldValidator>
                            </p>
                        </div>
                        <div class="am-form-group">
                            <label for="doc-ipt-pwd-2" class="am-u-sm-4 am-form-label">旧密码(重复密码)</label>
                            <div class="am-u-sm-8">
                                <asp:TextBox runat="server" ID="login_oldpwd" placeholder="输入登陆密码" />
                            </div>
                            <p class="am-kai">
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="×密码不能为空" ControlToValidate="login_oldpwd" ForeColor="Blue"></asp:RequiredFieldValidator>
                            </p>
                        </div>
                        <div class="am-form-group">
                            <div class="am-u-sm-10 am-u-sm-offset-1">
                                <asp:HiddenField ID="hide_id" runat="server" />
                                <asp:Button runat="server" ID="Bt_present" class="am-btn am-btn-default" Text="提交" OnClick="Bt_present_Click" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
</asp:Content>

